package com.example.administrator.amicool516zzm.activity;

import android.content.Intent;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;

import com.example.administrator.amicool516zzm.R;
import com.example.administrator.amicool516zzm.fragment.ArticleFragment;
import com.example.administrator.amicool516zzm.fragment.CourseFragment;
import com.example.administrator.amicool516zzm.fragment.VideoFragment;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{
        private Button bt1, bt2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        bt1 = (Button)findViewById(R.id.button);    //注册
        bt2 = (Button)findViewById(R.id.button2);   //登陆
        bt1.setOnClickListener(this);
        bt2.setOnClickListener(this);

    }
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.button:
                Intent intent=new Intent(MainActivity.this,LoginActivity.class);
                startActivity(intent);
                break;
            case R.id.button2:
                Intent intent1=new Intent(MainActivity.this,weixin.class);
                startActivity(intent1);
                break;
        }
    }
}
